export default {
  setProducts (state, data) { // 同步数据到vuex
    state.products = data
  },
  reducePrice (state, payload) { // 点击按钮商品减一
    state.products.forEach((product) => {
      product.price -= payload
    })
  }
}
